﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using System.Drawing;

namespace Factonomy.AzureStorageUtility.WindowsApp.Resources
{
    class ResourceManager
    {
        private static string _namespace = "Factonomy.AzureStorageUtility.WindowsApp.Files.";
        private ImageList _imageList = new ImageList();

        public ImageList SmallIconList
        {
            get { return this._imageList; }
        }

        public ResourceManager()
        {
            this._imageList.Images.Add("user", Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream(_namespace + "user.png")));
            this._imageList.Images.Add("tick", Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream(_namespace + "tick.png")));
            this._imageList.Images.Add("folder", Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream(_namespace + "folder.png")));
        }

        public static Stream Logo()
        {
            return Assembly.GetExecutingAssembly().GetManifestResourceStream(_namespace + "FactonomyLogo.jpg");
        }

        public static Icon GetAppIcon()
        {
            return new Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream(_namespace + "App.ico"));
        }
    }
}
